//
//  SYRefreshHeader.m
//  SYPerfectDemo
//
//  Created by Lssyyy on 2018/4/27.
//  Copyright © 2018年 Lssyyy. All rights reserved.
//

#import "SYRefreshHeader.h"

@implementation SYRefreshHeader

+ (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action{
    
    SYRefreshHeader *header = [super headerWithRefreshingTarget:target refreshingAction:action];
    [header setImages:[self IdleImageArray] forState:MJRefreshStateIdle];
    [header setImages:[self pullImageArray] forState:MJRefreshStatePulling];
    [header setImages:[self refreshingImageArray] forState:MJRefreshStateRefreshing];
    return header;
}

+ (NSArray *)IdleImageArray{
    NSArray *arr = [NSArray arrayWithObjects:[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor], nil];
    return arr;
}

+ (NSArray *)pullImageArray{
    NSArray *arr = [NSArray arrayWithObjects:[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor], nil];
    return arr;
}

+ (NSArray *)refreshingImageArray{
    NSArray *arr = [NSArray arrayWithObjects:[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor],[UIImage imageWithColor:RandomColor], nil];
    return arr;
}
@end
